﻿<Window x:Class="CSSAdriverapp.AddDriver"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Add Driver" Height="306" Width="482" xmlns:my="clr-namespace:CSSAdriverapp" Icon="/CSSA%20Driver%20App;component/lorry_green_256.ico" ResizeMode="NoResize">
    <Grid Background="#C5AFB1AF">

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="252" />
            <ColumnDefinition Width="207*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="96" />
            <RowDefinition Height="141*" />
        </Grid.RowDefinitions>
        <DataGrid AutoGenerateColumns="False" Height="Auto" HorizontalAlignment="Stretch" Margin="7,0,14,4" Name="displaydataGrid" VerticalAlignment="Stretch" Grid.Row="1" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:AddDriver, AncestorLevel=1}, Path=students}"  AlternatingRowBackground="#FF96D2FF" SelectionMode="Single" IsReadOnly="True" CanUserAddRows="false" GridLinesVisibility="None" SelectionChanged="dataGrid1_SelectionChanged">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=first_name}" Header="First Name" />
                <DataGridTextColumn Binding="{Binding Path=last_name}" Header="Last Name" />
            </DataGrid.Columns>
        </DataGrid>
        <Label Content="First Name" Height="28" HorizontalAlignment="Left" Margin="12,4,0,0" Name="firstnameLabel" VerticalAlignment="Top" />
        <Label Content="Last Name" Height="28" HorizontalAlignment="Left" Margin="12,32,0,0" Name="lastnameLabel" VerticalAlignment="Top" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="85,5,0,0" Name="firstnameTextbox" VerticalAlignment="Top" Width="158" />
        <TextBox Height="23" HorizontalAlignment="Left" Margin="85,33,0,0" Name="lastnameTextbox" VerticalAlignment="Top" Width="158" />
        <Button Content="Search" Height="23" HorizontalAlignment="Left" Margin="168,63,0,0" Name="searchButton" VerticalAlignment="Top" Width="75" Click="Search_Click" />
        <Label Content="Selected Driver Information" Grid.Column="1" Height="28" HorizontalAlignment="Left" Margin="21,68,0,0" Name="informationHeadingLabel" VerticalAlignment="Top" FontStyle="Italic" />
        <Rectangle Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Margin="0,9,0,55" Name="rectangle1" Stroke="Black" Width="200" Fill="#FF9CB6B3" />
        <Label Content="First" Grid.Column="1" Grid.Row="1" Height="28" Margin="0,6,0,0" Name="firstnameDisplayLabel" VerticalAlignment="Top" HorizontalAlignment="Left" Width="97" />
        <Label Content="Last" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="0,27,0,0" Name="lastnameDisplayLabel" VerticalAlignment="Top" Width="97" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="47,54,0,0" Name="emailDisplayTextbox" VerticalAlignment="Top" Width="120" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="47,83,0,0" Name="phoneDisplayTextbox" VerticalAlignment="Top" Width="120" />
        <Label Content="Email:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="0,52,0,0" Name="emailLabel" VerticalAlignment="Top" />
        <Label Content="Phone:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="0,81,0,0" Name="phoneLabel" VerticalAlignment="Top" />
        <Button Content="Add Driver" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="126,138,0,0" Name="addDriverButton" VerticalAlignment="Top" Width="75" Click="AddDriver_Click" />
        <Label Content="Driver Added Succesfully" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="232,136,0,0" Name="driverAddedSucessfullyLabel" VerticalAlignment="Top" Foreground="#FF489719" BorderBrush="{x:Null}" IsEnabled="True" Visibility="Hidden" Grid.ColumnSpan="2" />
        <Label Content="Driver Already Exists" Grid.Row="1" Height="28" HorizontalAlignment="Right" Margin="0,136,112,0" Name="driverAlreadyExistsLabel" VerticalAlignment="Top" Visibility="Hidden" Foreground="#FFF20909" Grid.ColumnSpan="2" />
    </Grid>
</Window>
